package com.hx.springboot928.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author: 若若叶
 * @date: 2021/9/28 16:05 FileName: User Description:
 */
@Component
@ConfigurationProperties(prefix = "user")
public class User {
  private String userName;
  private Integer age;
  private String address;

  public User() {}

  public User(String userName, Integer age, String address) {
    this.userName = userName;
    this.age = age;
    this.address = address;
  }

  @Override
  public String toString() {
    return "User{"
        + "userName='"
        + userName
        + '\''
        + ", age="
        + age
        + ", address='"
        + address
        + '\''
        + '}';
  }

  public String getUserName() {
    return userName;
  }

  public void setUserName(String userName) {
    this.userName = userName;
  }

  public Integer getAge() {
    return age;
  }

  public void setAge(Integer age) {
    this.age = age;
  }

  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }
}
